<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Cs_model extends CI_Model {

	function __construct() {
		parent::__construct();
		
	}

	/**
	 * 공지사항 최신 리스트
	 */
	function select_notice_event_lastest_list() {
		log_message('debug',"#### Cs_model::select_notice_event_lastest_list()");
		
		$this->db->select('idx, category, subject');
		$this->db->where('category','notice');
		$this->db->or_where('category','event');
		$this->db->or_where('category','event_notice');
		$this->db->order_by('idx','desc');
		$this->db->limit(4);
		$query = $this->db->get('tb_bbs') or $this->logsql->log_sql('error');
		$result = $query->result_array();
		
		$this->logsql->log_sql();

		return $result;
	}
}

/* End of file cs_model.php */
/* Location: ./application/models/cs/cs_model.php */